<Grid 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  TextBlock.FontSize="10" VerticalAlignment="Top" Background="{Binding ImageBackground}"  HorizontalAlignment="Left"  Width="{Binding Width}" Height="{Binding Height}" >
    <Grid>
    <Grid.Effect>
        <DropShadowEffect Opacity="{Binding ShadowOpacity}" BlurRadius="{Binding ShadowBlurRadius}" Color="{Binding ShadowColor}" Direction="{Binding ShadowDirection}" RenderingBias="Performance" ShadowDepth="{Binding ShadowDepth}" />
    </Grid.Effect>

    <Grid Margin="{Binding Margin}">
        <Grid.LayoutTransform>
            <RotateTransform Angle="{Binding Rotation}"/>
        </Grid.LayoutTransform>
        <Border CornerRadius="{Binding CornerRadius}" BorderThickness="{Binding BorderThickness}" BorderBrush="{Binding BorderBrush}" Padding="{Binding Padding}">
            <Border.Background>
                <LinearGradientBrush EndPoint="0,1">
                    <GradientStop Color="{Binding LightColor}" Offset="0"/>
                    <GradientStop Color="{Binding BackgroundColor}"  Offset="0.5"/>
                    <GradientStop Color="{Binding DarkColor}"  Offset="0.52"/>
                    <GradientStop Color="{Binding BackgroundColor}"  Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition />
                    <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto" />
                    <ColumnDefinition  />
                    <ColumnDefinition Width="auto" />
                </Grid.ColumnDefinitions>
                <Grid.LayoutTransform>
                    <RotateTransform Angle="{Binding ContentRotation}"/>
                </Grid.LayoutTransform>
                <Grid.Effect>
                    <DropShadowEffect Opacity="{Binding ContentShadowOpacity}" BlurRadius="{Binding ContentShadowBlurRadius}" Color="{Binding ContentShadowColor}" Direction="{Binding ContentShadowDirection}" RenderingBias="Performance" ShadowDepth="{Binding ContentShadowDepth}" />
                </Grid.Effect>
                <Image HorizontalAlignment="Center" Margin="{Binding IconMargin}" Visibility="{Binding IconVisibility}" VerticalAlignment="Center" Source="{Binding Icon}" Grid.Row="{Binding Row}" Grid.Column="{Binding Column}"  SnapsToDevicePixels="True" Width="{Binding IconWidth}" Height="{Binding IconHeight}" />
                <TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding Text}" Foreground="{Binding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{Binding FontSize}" FontFamily="{Binding FontFamily}" FontWeight="{Binding FontWeight}" FontStyle="{Binding FontStyle}" FontStretch="{Binding FontStretch}" />
            </Grid>
        </Border>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition  Height="2*"/>
                <RowDefinition />
            </Grid.RowDefinitions>

            <Border CornerRadius="{Binding CornerRadius}" Margin="{Binding HighlightMargin}"  BorderThickness="{Binding BorderThickness}" BorderBrush="Transparent" Opacity="{Binding HighlightOpacity}">
                <Border.Background>
                    <LinearGradientBrush EndPoint="0,1">
                        <GradientStop Color="{Binding HighlightColor}" Offset="0"/>
                        <GradientStop Color="Transparent"  Offset="{Binding HighlightTransparentOffset}"/>
                    </LinearGradientBrush>
                </Border.Background>
                <Border.Effect>
                    <BlurEffect RenderingBias="Performance" Radius="{Binding HighlightBlurRadius}" />
                </Border.Effect>
            </Border>
        </Grid>
    </Grid>
    </Grid>
</Grid>
